<!--{include admin_header}-->
				<div class="main-content">
					<div class="breadcrumbs" id="breadcrumbs">
						<script type="text/javascript">
							try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
						</script>
<!--{include admin_breadcrumb}-->
					</div>

					<div class="page-content">
						<div class="page-header">
							<h1>{$_G['admincp']['actname']}<small><i class="icon-double-angle-right"></i>{$_G['admincp']['optname']}</small></h1>
						</div><!-- /.page-header -->

						<div class="row">
							<div class="col-xs-12">
								<!-- PAGE CONTENT BEGINS -->

								<div class="alert alert-block alert-success">
									<button type="button" class="close" data-dismiss="alert">
										<i class="icon-remove"></i>
									</button>

									<i class="icon-ok green"></i>

									欢迎使用
									<strong class="green">
										<span style=" color:#000;">黑</span><span class="red">晶</span>
										<small>OA 系统(Beta 1.01)</small>
									</strong>
                                    <span class="hidden-480">
									, Powered by Heivr Technology Department.	
                                    </span>
								</div>

								<div class="row">
									<div class="space-6"></div>

									<div class="col-sm-7 infobox-container">
										<div class="infobox infobox-green  ">
											<div class="infobox-icon">
												<i class="icon-group"></i>
											</div>

											<div class="infobox-data">
												<span class="infobox-data-number">${intval($counts['customer']['total'])}</span>
												<div class="infobox-content">客户</div>
											</div>
											<div class="stat stat-success">${intval($counts['customer']['month'])}</div>
										</div>

										<div class="infobox infobox-blue  ">
											<div class="infobox-icon">
												<i class="icon-twitter"></i>
											</div>

											<div class="infobox-data">
												<span class="infobox-data-number">${intval($counts['customer_contacts']['total'])}</span>
												<div class="infobox-content">沟通</div>
											</div>

											<div class="badge badge-success hide">
												+32%
												<i class="icon-arrow-up"></i>
											</div>
										</div>

										<div class="infobox infobox-pink hide  ">
											<div class="infobox-icon">
												<i class="icon-shopping-cart"></i>
											</div>

											<div class="infobox-data">
												<span class="infobox-data-number">8</span>
												<div class="infobox-content">新订单</div>
											</div>
											<div class="stat stat-important">4%</div>
										</div>

										<div class="infobox infobox-red">
											<div class="infobox-icon">
												<i class="icon-beaker"></i>
											</div>

											<div class="infobox-data">
												<span class="infobox-data-number">${intval($counts['team']['total'])}</span>
												<div class="infobox-content">项目</div>
											</div>
										</div>

										<div class="infobox infobox-orange2 hide">
											<div class="infobox-chart">
												<span class="sparkline" data-values="196,128,202,177,154,94,100,170,224"></span>
											</div>

											<div class="infobox-data">
												<span class="infobox-data-number">6,251</span>
												<div class="infobox-content">页面查看次数</div>
											</div>

											<div class="badge badge-success">
												7.2%
												<i class="icon-arrow-up"></i>
											</div>
										</div>

										<div class="infobox infobox-blue2 hide">
											<div class="infobox-progress">
												<div class="easy-pie-chart percentage" data-percent="42" data-size="46">
													<span class="percent">42</span>%
												</div>
											</div>

											<div class="infobox-data">
												<span class="infobox-text">交易使用</span>

												<div class="infobox-content">
													<span class="bigger-110">~</span>
													剩余58GB
												</div>
											</div>
										</div>

										<div class="space-6"></div>

										<div class="infobox infobox-green infobox-small infobox-dark hide">
											<div class="infobox-progress">
												<div class="easy-pie-chart percentage" data-percent="61" data-size="39">
													<span class="percent">61</span>%
												</div>
											</div>

											<div class="infobox-data">
												<div class="infobox-content">任务</div>
												<div class="infobox-content">完成</div>
											</div>
										</div>

										<div class="infobox infobox-blue infobox-small infobox-dark hide">
											<div class="infobox-chart">
												<span class="sparkline" data-values="3,4,2,3,4,4,2,2"></span>
											</div>

											<div class="infobox-data">
												<div class="infobox-content">获得</div>
												<div class="infobox-content">$32,000</div>
											</div>
										</div>

										<div class="infobox infobox-grey infobox-small infobox-dark hide">
											<div class="infobox-icon">
												<i class="icon-download-alt"></i>
											</div>

											<div class="infobox-data">
												<div class="infobox-content">下载次数</div>
												<div class="infobox-content">1,205</div>
											</div>
										</div>
									</div>

									<div class="vspace-sm"></div>

									<div class="col-sm-5">
										<div class="widget-box">
											<div class="widget-header widget-header-flat widget-header-small">
												<h5>
													<i class="icon-signal"></i>
													访问来源 <span class="hidden-480"><i class="icon-calendar"></i>(<span class="source-day"></span>)</span>
												</h5>

												<div class="widget-toolbar no-border">
													<button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown">
														<span class="source-date">本周</span>
														<i class="icon-angle-down icon-on-right bigger-110"></i>
													</button>

													<ul class="dropdown-menu pull-right dropdown-125 dropdown-lighter dropdown-caret">
														<li class="active">
															<a href="javascript:void(0);" class="blue src-date" day="week">
																<i class="src-box-icon icon-caret-right bigger-110">&nbsp;</i>本周
															</a>
														</li>

														<li>
															<a href="javascript:void(0);" class="blue src-date" day="last">
																<i class="src-box-icon icon-caret-right bigger-110 invisible">&nbsp;</i>上周
															</a>
														</li>

														<li>
															<a href="javascript:void(0);" class="blue src-date" day="month">
																<i class="src-box-icon icon-caret-right bigger-110 invisible">&nbsp;</i>本月
															</a>
														</li>

														<li>
															<a href="javascript:void(0);" class="blue src-date" day="last_month">
																<i class="src-box-icon icon-caret-right bigger-110 invisible">&nbsp;</i>上月
															</a>
														</li>
													</ul>
												</div>
											</div>

											<div class="widget-body">
												<div class="widget-main">
                                                	<div class="source-loading message-loading-overlay"><i class="icon-spin icon-spinner orange2 bigger-160"></i></div>
													<div id="piechart-placeholder"></div>
												</div><!-- /widget-main -->
											</div><!-- /widget-body -->
										</div><!-- /widget-box -->
									</div><!-- /span -->
								</div><!-- /row -->

								<div class="hr hr32 hr-dotted"></div>

<!--{if $admincp->manage}-->
                                <div class="row">
									<div class="col-xs-12">
										<div class="widget-box transparent">
											<div class="widget-header widget-header-flat">
												<h4 class="lighter">
													<i class="icon-star orange"></i>今日业务摘要
												</h4>

												<div class="widget-toolbar">
													<a href="javascript:void(0);" data-action="collapse">
														<i class="icon-chevron-up"></i>
													</a>
												</div>
											</div>

											<div class="widget-body">
												<div class="widget-main no-padding">
													<table class="table table-bordered table-striped" style="text-align:center;">
														<thead class="thin-border-bottom">
                                                            <tr>
                                                                <td rowspan="2" class="tabled"><i class="icon-group icon-4x blue"></i></td>
                                                                <td colspan="2" class="tabled"><i class="icon-caret-right blue"></i>客户</td>
                                                                <td colspan="2" class="tabled"><i class="icon-caret-right blue"></i>沟通记录</td>
                                                            </tr>
                                                            <tr>
                                                                <td class="tabled">新增</td>
                                                                <td class="tabled">总计</td>
                                                                <td class="tabled">新增</td>
                                                                <td class="tabled">总计</td>
                                                            </tr>
														</thead>
														<tbody>
<!--{loop $todays['admins'] $k $v}-->
															<tr>
																<td>${heivrid($v)}</td>
																<td>${intval($todays['datas']['customer']['today'][$v['id']])}</td>
																<td>${intval($todays['datas']['customer']['total'][$v['id']])}</td>
																<td>${intval($todays['datas']['customer_contact']['today'][$v['id']])}</td>
																<td>${intval($todays['datas']['customer_contact']['total'][$v['id']])}</td>
															</tr>
<!--{/loop}-->
														</tbody>
													</table>
												</div><!-- /widget-main -->
											</div><!-- /widget-body -->
										</div><!-- /widget-box -->
									</div>
								</div>

								<div class="hr hr32 hr-dotted"></div>

                                <div class="row">
									<div class="col-xs-12">
										<div class="widget-box transparent">
											<div class="widget-header widget-header-flat">
												<h4 class="lighter">
													<i class="icon-star orange"></i>本月业务销售统计
												</h4>

												<div class="widget-toolbar">
													<a href="javascript:void(0);" data-action="collapse">
														<i class="icon-chevron-up"></i>
													</a>
												</div>
											</div>

											<div class="widget-body">
												<div class="widget-main no-padding">
													<table class="table table-bordered table-striped">
														<tbody id="salers-body"></tbody>
													</table>
												</div><!-- /widget-main -->
											</div><!-- /widget-body -->
										</div><!-- /widget-box -->
									</div>
								</div>

								<div class="hr hr32 hr-dotted"></div>

                                <div class="row">
									<div class="col-xs-12">
										<div class="widget-box transparent">
											<div class="widget-header widget-header-flat">
												<h4 class="lighter">
													<i class="icon-star orange"></i>本月公司销售统计
												</h4>

												<div class="widget-toolbar">
													<a href="javascript:void(0);" data-action="collapse">
														<i class="icon-chevron-up"></i>
													</a>
												</div>
											</div>

											<div class="widget-body">
												<div class="widget-main no-padding col-xs-11">
													<div id="company-piechart-placeholder"></div>
												</div><!-- /widget-main -->
											</div><!-- /widget-body -->
										</div><!-- /widget-box -->
									</div>
								</div>

								<div class="hr hr32 hr-dotted"></div>

                                <div class="row">
									<div class="col-xs-12">
										<div class="widget-box transparent">
											<div class="widget-header widget-header-flat">
												<h4 class="lighter">
													<i class="icon-signal"></i>客户统计 
												</h4>

												<div class="widget-toolbar">
													<a href="javascript:void(0);" data-action="reload">
														<i class="icon-refresh"></i>
													</a>
													<a href="javascript:void(0);" data-action="collapse">
														<i class="icon-chevron-up"></i>
													</a>
												</div>
											</div>

											<div class="widget-body">
												<div class="widget-main padding-4">
													<div id="signed-sales-charts"></div>
												</div><!-- /widget-main -->
											</div><!-- /widget-body -->
										</div><!-- /widget-box -->
									</div>
								</div>
<!--{/if}-->

								<div class="hr hr32 hr-dotted"></div>

								<div class="row">
									<div class="col-sm-12">
										<div class="widget-box transparent">
											<div class="widget-header widget-header-flat">
												<h4 class="lighter">
													<i class="icon-star orange"></i>最新客户
												</h4>

												<div class="widget-toolbar">
													<a href="javascript:void(0);" data-action="collapse">
														<i class="icon-chevron-up"></i>
													</a>
												</div>
											</div>

											<div class="widget-body">
												<div class="widget-main no-padding">
													<table class="table table-bordered table-striped">
														<thead class="thin-border-bottom">
															<tr>
																<th>
																	<i class="icon-caret-right blue"></i>
																	名称
																</th>

																<th>
																	<i class="icon-caret-right blue"></i>公司性质
																</th>

																<th class="hidden-480">
																	<i class="icon-caret-right blue"></i>
																	状态
																</th>
															</tr>
														</thead>

														<tbody>
<!--{loop $new_customers $k $v}-->
															<tr>
																<td>{$v['name']}</td>

																<td>
<!--{if $natures[$v['nature']]}-->
																	<b class="green">{$natures[$v['nature']]}</b>
<!--{else}-->
																	<small><s class="grey">未知</s></small>
<!--{/if}-->
																</td>

																<td class="hidden-480">
																	<span class="label {$status_class[$v['status']]}">{$status[$v['status']]}</span>
																</td>
															</tr>
<!--{/loop}-->
														</tbody>
													</table>
												</div><!-- /widget-main -->
											</div><!-- /widget-body -->
										</div><!-- /widget-box -->
									</div>

									<div class="col-sm-12">
										<div class="widget-box transparent">
											<div class="widget-header widget-header-flat">
												<h4 class="lighter">
													<i class="icon-signal"></i>性质统计
												</h4>

												<div class="widget-toolbar">
													<a href="javascript:void(0);" data-action="collapse">
														<i class="icon-chevron-up"></i>
													</a>
												</div>
											</div>

											<div class="widget-body">
												<div class="widget-main padding-4">
													<div id="sales-charts"></div>
												</div><!-- /widget-main -->
											</div><!-- /widget-body -->
										</div><!-- /widget-box -->
									</div>
								</div>                                

								<div class="hr hr32 hr-dotted"></div>

								<div class="row hide">
									<div class="col-sm-6">
										<div class="widget-box transparent" id="recent-box">
											<div class="widget-header">
												<h4 class="lighter smaller">
													<i class="icon-rss orange"></i>
													最近
												</h4>

												<div class="widget-toolbar no-border">
													<ul class="nav nav-tabs" id="recent-tab">
														<li class="active">
															<a data-toggle="tab" href="#task-tab">任务</a>
														</li>

														<li>
															<a data-toggle="tab" href="#member-tab">会员</a>
														</li>

														<li>
															<a data-toggle="tab" href="#comment-tab">沟通</a>
														</li>
													</ul>
												</div>
											</div>

											<div class="widget-body">
												<div class="widget-main padding-4">
													<div class="tab-content padding-8 overflow-visible">
														<div id="task-tab" class="tab-pane active">
															<h4 class="smaller lighter green">
																<i class="icon-list"></i>最新项目
															</h4>

															<ul id="tasks" class="item-list">
																<li class="item-orange clearfix">
																	<label class="inline">
																		<input type="checkbox" class="ace" />
																		<span class="lbl"> 问答</span>
																	</label>

																	<div class="pull-right easy-pie-chart percentage" data-size="30" data-color="#ECCB71" data-percent="42">
																		<span class="percent">42</span>%
																	</div>
																</li>

																<li class="item-red clearfix">
																	<label class="inline">
																		<input type="checkbox" class="ace" />
																		<span class="lbl"> BUG修复</span>
																	</label>

																	<div class="pull-right action-buttons">
																		<a href="#" class="blue">
																			<i class="icon-pencil bigger-130"></i>
																		</a>

																		<span class="vbar"></span>

																		<a href="#" class="red">
																			<i class="icon-trash bigger-130"></i>
																		</a>

																		<span class="vbar"></span>

																		<a href="#" class="green">
																			<i class="icon-flag bigger-130"></i>
																		</a>
																	</div>
																</li>

																<li class="item-default clearfix">
																	<label class="inline">
																		<input type="checkbox" class="ace" />
																		<span class="lbl">添加新的特征</span>
																	</label>

																	<div class="inline pull-right position-relative dropdown-hover">
																		<button class="btn btn-minier bigger btn-primary">
																			<i class="icon-cog icon-only bigger-120"></i>
																		</button>

																		<ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-caret dropdown-close pull-right">
																			<li>
																				<a href="#" class="tooltip-success" data-rel="tooltip" title="Mark&nbsp;as&nbsp;done">
																					<span class="green">
																						<i class="icon-ok bigger-110"></i>
																					</span>
																				</a>
																			</li>

																			<li>
																				<a href="#" class="tooltip-error" data-rel="tooltip" title="Delete">
																					<span class="red">
																						<i class="icon-trash bigger-110"></i>
																					</span>
																				</a>
																			</li>
																		</ul>
																	</div>
																</li>

																<li class="item-blue clearfix">
																	<label class="inline">
																		<input type="checkbox" class="ace" />
																		<span class="lbl"> 更新模版脚本</span>
																	</label>
																</li>

																<li class="item-grey clearfix">
																	<label class="inline">
																		<input type="checkbox" class="ace" />
																		<span class="lbl"> 添加新皮肤</span>
																	</label>
																</li>

																<li class="item-green clearfix">
																	<label class="inline">
																		<input type="checkbox" class="ace" />
																		<span class="lbl"> 升级服务端</span>
																	</label>
																</li>

																<li class="item-pink clearfix">
																	<label class="inline">
																		<input type="checkbox" class="ace" />
																		<span class="lbl"> 清理垃圾</span>
																	</label>
																</li>
															</ul>
														</div>

														<div id="member-tab" class="tab-pane">
															<div class="clearfix">
																<div class="itemdiv memberdiv">
																	<div class="user">
																		<img alt="Bob Doe's avatar" src="/static/ace/assets/avatars/user.jpg" />
																	</div>

																	<div class="body">
																		<div class="name">
																			<a href="#">Bob Doe</a>
																		</div>

																		<div class="time">
																			<i class="icon-time"></i>
																			<span class="green">20 min</span>
																		</div>

																		<div>
																			<span class="label label-warning label-sm">pending</span>

																			<div class="inline position-relative">
																				<button class="btn btn-minier bigger btn-yellow btn-no-border dropdown-toggle" data-toggle="dropdown">
																					<i class="icon-angle-down icon-only bigger-120"></i>
																				</button>

																				<ul class="dropdown-menu dropdown-only-icon dropdown-yellow pull-right dropdown-caret dropdown-close">
																					<li>
																						<a href="#" class="tooltip-success" data-rel="tooltip" title="Approve">
																							<span class="green">
																								<i class="icon-ok bigger-110"></i>
																							</span>
																						</a>
																					</li>

																					<li>
																						<a href="#" class="tooltip-warning" data-rel="tooltip" title="Reject">
																							<span class="orange">
																								<i class="icon-remove bigger-110"></i>
																							</span>
																						</a>
																					</li>

																					<li>
																						<a href="#" class="tooltip-error" data-rel="tooltip" title="Delete">
																							<span class="red">
																								<i class="icon-trash bigger-110"></i>
																							</span>
																						</a>
																					</li>
																				</ul>
																			</div>
																		</div>
																	</div>
																</div>

																<div class="itemdiv memberdiv">
																	<div class="user">
																		<img alt="Joe Doe's avatar" src="/static/ace/assets/avatars/avatar2.png" />
																	</div>

																	<div class="body">
																		<div class="name">
																			<a href="#">Joe Doe</a>
																		</div>

																		<div class="time">
																			<i class="icon-time"></i>
																			<span class="green">1 hour</span>
																		</div>

																		<div>
																			<span class="label label-warning label-sm">pending</span>

																			<div class="inline position-relative">
																				<button class="btn btn-minier bigger btn-yellow btn-no-border dropdown-toggle" data-toggle="dropdown">
																					<i class="icon-angle-down icon-only bigger-120"></i>
																				</button>

																				<ul class="dropdown-menu dropdown-only-icon dropdown-yellow pull-right dropdown-caret dropdown-close">
																					<li>
																						<a href="#" class="tooltip-success" data-rel="tooltip" title="Approve">
																							<span class="green">
																								<i class="icon-ok bigger-110"></i>
																							</span>
																						</a>
																					</li>

																					<li>
																						<a href="#" class="tooltip-warning" data-rel="tooltip" title="Reject">
																							<span class="orange">
																								<i class="icon-remove bigger-110"></i>
																							</span>
																						</a>
																					</li>

																					<li>
																						<a href="#" class="tooltip-error" data-rel="tooltip" title="Delete">
																							<span class="red">
																								<i class="icon-trash bigger-110"></i>
																							</span>
																						</a>
																					</li>
																				</ul>
																			</div>
																		</div>
																	</div>
																</div>

																<div class="itemdiv memberdiv">
																	<div class="user">
																		<img alt="Jim Doe's avatar" src="/static/ace/assets/avatars/avatar.png" />
																	</div>

																	<div class="body">
																		<div class="name">
																			<a href="#">Jim Doe</a>
																		</div>

																		<div class="time">
																			<i class="icon-time"></i>
																			<span class="green">2 hour</span>
																		</div>

																		<div>
																			<span class="label label-warning label-sm">pending</span>

																			<div class="inline position-relative">
																				<button class="btn btn-minier bigger btn-yellow btn-no-border dropdown-toggle" data-toggle="dropdown">
																					<i class="icon-angle-down icon-only bigger-120"></i>
																				</button>

																				<ul class="dropdown-menu dropdown-only-icon dropdown-yellow pull-right dropdown-caret dropdown-close">
																					<li>
																						<a href="#" class="tooltip-success" data-rel="tooltip" title="Approve">
																							<span class="green">
																								<i class="icon-ok bigger-110"></i>
																							</span>
																						</a>
																					</li>

																					<li>
																						<a href="#" class="tooltip-warning" data-rel="tooltip" title="Reject">
																							<span class="orange">
																								<i class="icon-remove bigger-110"></i>
																							</span>
																						</a>
																					</li>

																					<li>
																						<a href="#" class="tooltip-error" data-rel="tooltip" title="Delete">
																							<span class="red">
																								<i class="icon-trash bigger-110"></i>
																							</span>
																						</a>
																					</li>
																				</ul>
																			</div>
																		</div>
																	</div>
																</div>

																<div class="itemdiv memberdiv">
																	<div class="user">
																		<img alt="Alex Doe's avatar" src="/static/ace/assets/avatars/avatar5.png" />
																	</div>

																	<div class="body">
																		<div class="name">
																			<a href="#">Alex Doe</a>
																		</div>

																		<div class="time">
																			<i class="icon-time"></i>
																			<span class="green">3 hour</span>
																		</div>

																		<div>
																			<span class="label label-danger label-sm">blocked</span>
																		</div>
																	</div>
																</div>

																<div class="itemdiv memberdiv">
																	<div class="user">
																		<img alt="Bob Doe's avatar" src="/static/ace/assets/avatars/avatar2.png" />
																	</div>

																	<div class="body">
																		<div class="name">
																			<a href="#">Bob Doe</a>
																		</div>

																		<div class="time">
																			<i class="icon-time"></i>
																			<span class="green">6 hour</span>
																		</div>

																		<div>
																			<span class="label label-success label-sm arrowed-in">approved</span>
																		</div>
																	</div>
																</div>

																<div class="itemdiv memberdiv">
																	<div class="user">
																		<img alt="Susan's avatar" src="/static/ace/assets/avatars/avatar3.png" />
																	</div>

																	<div class="body">
																		<div class="name">
																			<a href="#">Susan</a>
																		</div>

																		<div class="time">
																			<i class="icon-time"></i>
																			<span class="green">yesterday</span>
																		</div>

																		<div>
																			<span class="label label-success label-sm arrowed-in">approved</span>
																		</div>
																	</div>
																</div>

																<div class="itemdiv memberdiv">
																	<div class="user">
																		<img alt="Phil Doe's avatar" src="/static/ace/assets/avatars/avatar4.png" />
																	</div>

																	<div class="body">
																		<div class="name">
																			<a href="#">Phil Doe</a>
																		</div>

																		<div class="time">
																			<i class="icon-time"></i>
																			<span class="green">2 days ago</span>
																		</div>

																		<div>
																			<span class="label label-info label-sm arrowed-in arrowed-in-right">online</span>
																		</div>
																	</div>
																</div>

																<div class="itemdiv memberdiv">
																	<div class="user">
																		<img alt="Alexa Doe's avatar" src="/static/ace/assets/avatars/avatar1.png" />
																	</div>

																	<div class="body">
																		<div class="name">
																			<a href="#">Alexa Doe</a>
																		</div>

																		<div class="time">
																			<i class="icon-time"></i>
																			<span class="green">3天以前</span>
																		</div>

																		<div>
																			<span class="label label-success label-sm arrowed-in">approved</span>
																		</div>
																	</div>
																</div>
															</div>

															<div class="center">
																<i class="icon-group icon-2x green"></i>

																&nbsp;
																<a href="?action=account&operation=index">
																	查看所有员工 &nbsp;
																	<i class="icon-arrow-right"></i>
																</a>
															</div>

															<div class="hr hr-double hr8"></div>
														</div><!-- member-tab -->

														<div id="comment-tab" class="tab-pane">
															<div class="comments">
<!--{loop $customer_contacts $k $v}-->
																<div class="itemdiv commentdiv">
																	<div class="user">
																		<img alt="${heivrid($admins[$v['adminid']])}的头像" src="${avatar($admins[$v['adminid']]['avatar'])}" />
																	</div>

																	<div class="body">
																		<div class="name">
																			<a href="?action=account&operation=profile&profile=yes&heivrid={$admins[$v['adminid']]['username']}">${heivrid($admins[$v['adminid']])}</a>
																		</div>

																		<div class="time">
																			<i class="icon-time"></i>
																			<span class="green">${HumanTime($v['create_time'])}</span>
																		</div>

																		<div class="text">
																			<i class="icon-quote-left"></i>{$v['content']}
																		</div>
																	</div>

																	<div class="tools">
																		<div class="inline position-relative">
																			<button class="btn btn-minier bigger btn-yellow dropdown-toggle" data-toggle="dropdown">
																				<i class="icon-angle-down icon-only bigger-120"></i>
																			</button>

																			<ul class="dropdown-menu dropdown-only-icon dropdown-yellow pull-right dropdown-caret dropdown-close">
																				<li>
																					<a href="#" class="tooltip-success" data-rel="tooltip" title="Approve">
																						<span class="green">
																							<i class="icon-ok bigger-110"></i>
																						</span>
																					</a>
																				</li>

																				<li>
																					<a href="#" class="tooltip-warning" data-rel="tooltip" title="Reject">
																						<span class="orange">
																							<i class="icon-remove bigger-110"></i>
																						</span>
																					</a>
																				</li>

																				<li>
																					<a href="#" class="tooltip-error" data-rel="tooltip" title="Delete">
																						<span class="red">
																							<i class="icon-trash bigger-110"></i>
																						</span>
																					</a>
																				</li>
																			</ul>
																		</div>
																	</div>
																</div>
<!--{/loop}-->
															</div>

															<div class="hr hr8"></div>

															<div class="center">
																<i class="icon-comments-alt icon-2x green"></i>

																&nbsp;
																<a href="#">
																	查看全部 &nbsp;
																	<i class="icon-arrow-right"></i>
																</a>
															</div>

															<div class="hr hr-double hr8"></div>
														</div>
													</div>
												</div><!-- /widget-main -->
											</div><!-- /widget-body -->
										</div><!-- /widget-box -->
									</div><!-- /span -->

									<div class="col-sm-6">
										<div class="widget-box ">
											<div class="widget-header">
												<h4 class="lighter smaller">
													<i class="icon-comment blue"></i>
													会话
												</h4>
											</div>

											<div class="widget-body">
												<div class="widget-main no-padding">
													<div class="dialogs">
														<div class="itemdiv dialogdiv">
															<div class="user">
																<img alt="Alexa's Avatar" src="/static/ace/assets/avatars/avatar1.png" />
															</div>

															<div class="body">
																<div class="time">
																	<i class="icon-time"></i>
																	<span class="green">4秒钟前</span>
																</div>

																<div class="name">
																	<a href="#">Alexa</a>
																</div>
																<div class="text">大家好啊</div>

																<div class="tools">
																	<a href="#" class="btn btn-minier btn-info">
																		<i class="icon-only icon-share-alt"></i>
																	</a>
																</div>
															</div>
														</div>

														<div class="itemdiv dialogdiv">
															<div class="user">
																<img alt="John's Avatar" src="/static/ace/assets/avatars/avatar.png" />
															</div>

															<div class="body">
																<div class="time">
																	<i class="icon-time"></i>
																	<span class="blue">38秒以前</span>
																</div>

																<div class="name">
																	<a href="#">John</a>
																</div>
																<div class="text">框架很好用嘛</div>

																<div class="tools">
																	<a href="#" class="btn btn-minier btn-info">
																		<i class="icon-only icon-share-alt"></i>
																	</a>
																</div>
															</div>
														</div>

														<div class="itemdiv dialogdiv">
															<div class="user">
																<img alt="Bob's Avatar" src="/static/ace/assets/avatars/user.jpg" />
															</div>

															<div class="body">
																<div class="time">
																	<i class="icon-time"></i>
																	<span class="orange">2分钟以前</span>
																</div>

																<div class="name">
																	<a href="#">Bob</a>
																	<span class="label label-info arrowed arrowed-in-right">admin</span>
																</div>
																<div class="text">欢迎大家使用ACE后台管理系统.</div>

																<div class="tools">
																	<a href="#" class="btn btn-minier btn-info">
																		<i class="icon-only icon-share-alt"></i>
																	</a>
																</div>
															</div>
														</div>

														<div class="itemdiv dialogdiv">
															<div class="user">
																<img alt="Jim's Avatar" src="/static/ace/assets/avatars/avatar4.png" />
															</div>

															<div class="body">
																<div class="time">
																	<i class="icon-time"></i>
																	<span class="grey">3分钟以前</span>
																</div>

																<div class="name">
																	<a href="#">Jim</a>
																</div>
																<div class="text">大家多提提BUG</div>

																<div class="tools">
																	<a href="#" class="btn btn-minier btn-info">
																		<i class="icon-only icon-share-alt"></i>
																	</a>
																</div>
															</div>
														</div>

														<div class="itemdiv dialogdiv">
															<div class="user">
																<img alt="Alexa's Avatar" src="/static/ace/assets/avatars/avatar1.png" />
															</div>

															<div class="body">
																<div class="time">
																	<i class="icon-time"></i>
																	<span class="green">4分钟以前</span>
																</div>

																<div class="name">
																	<a href="#">Alexa</a>
																</div>
																<div class="text">继续支持ACE后台系统</div>

																<div class="tools">
																	<a href="#" class="btn btn-minier btn-info">
																		<i class="icon-only icon-share-alt"></i>
																	</a>
																</div>
															</div>
														</div>
													</div>

													<form>
														<div class="form-actions">
															<div class="input-group">
																<input placeholder="Type your message here ..." type="text" class="form-control" name="message" />
																<span class="input-group-btn">
																	<button class="btn btn-sm btn-info no-radius" type="button">
																		<i class="icon-share-alt"></i>
																		发送
																	</button>
																</span>
															</div>
														</div>
													</form>
												</div><!-- /widget-main -->
											</div><!-- /widget-body -->
										</div><!-- /widget-box -->
									</div><!-- /span -->
								</div><!-- /row -->
								<!-- PAGE CONTENT ENDS -->
							</div><!-- /.col -->
						</div><!-- /.row -->
					</div><!-- /.page-content -->
				</div><!-- /.main-content -->
<!--{include admin_footer}-->
		<!-- page specific plugin scripts -->

		<!--[if lte IE 8]>
		  <script src="/static/ace/assets/js/excanvas.min.js"></script>
		<![endif]-->

		<script src="/static/ace/assets/js/jquery-ui-1.10.3.custom.min.js"></script>
		<script src="/static/ace/assets/js/jquery.ui.touch-punch.min.js"></script>
		<script src="/static/ace/assets/js/jquery.slimscroll.min.js"></script>
		<script src="/static/ace/assets/js/jquery.easy-pie-chart.min.js"></script>
		<script src="/static/ace/assets/js/jquery.sparkline.min.js"></script>
		<script src="/static/ace/assets/js/flot/jquery.flot.min.js"></script>
		<script src="/static/ace/assets/js/flot/jquery.flot.pie.min.js"></script>
		<script src="/static/ace/assets/js/flot/jquery.flot.resize.min.js"></script>


		<!-- inline scripts related to this page -->

		<script type="text/javascript">
			D.Salers = {
				init : function(){
					this.get();
				},
				set : function(data){
					var html = '';
					$.each(data.datas, function(i, n){
						var datahtml = '';
						var css = ['progress-inverse', 'progress-bar-warning', 'progress-bar-success', 'progress-bar-striped', 'progress-bar-danger'];
						var c = 0;
						var title = '';
						if( n.customers ){
							$.each(n.customers, function(pk, pv){
								var d = (pv/data.count);
								title += pk + pv + '个,';
								if( pv > 0 ){
									datahtml += '<div data-rel="tooltip" title="'+pk+'" class="progress-bar '+css[c]+' active" style="width: '+((d) * 100)+'%;">'+pv+'</div>';
								}
								c++;
							});
						}
						title += '共计' + (n.sum ? n.sum : 0) + '个';
						html += '<tr data-rel="tooltip" title="'+title+'"><td><div class="pull-left col-xs-3" style="text-align:center;"><img width="18" align="middle" height="18" src="'+n.avatar+'" />'+(n.realname ? n.realname : n.username)+'</div><div class="progress">'+datahtml+'</div></td></tr>';
					});
					$('#salers-body').html(html);
					$('[data-rel=tooltip]').tooltip();
				},
				get : function(){
					D.ajax.get('?act=get_salers', function(json){
						D.Salers.set(json.data);
						if( json.data.companys ){
							D.Charts.company.set(json.data.companys);
						}
					});
				}
			}
			D.Charts = {
				init : function(){
					D.Charts.status.get();
				},
				company : {
					set : function(datas){
						var data = [];
						$.each(datas, function(i, n){
							var c = {
								label : n.name,
								data : n.sum
							}
							data.push(c);
						});
						var plc = $('#company-piechart-placeholder').css({'width':'100%' , 'height':'220px'});
						$.plot(plc, data, {
							series: {
								pie: {
									show: true,
									tilt:0.8,
									highlight: {
										opacity: 0.25
									},
									stroke: {
										color: '#fff',
										width: 2
									},
									startAngle: 2
								},
							},
							legend: {
								show: true,
								position: "ne", 
								labelBoxBorderColor: null,
								margin:[-30,15]
							}
							,
							grid: {
								hoverable: true,
								clickable: true
							}
						 });
					}
				},
				status : {
					set : function(datas){
						if( datas ){
							var posts = [];
							$.each(datas, function(i, n){
								var v = [];
								for(var ti = 0; ti < 12; ti++){
									var pk = (ti + 1);
									var pv = n[pk] ? n[pk] : 0;
									v.push([pk, pv]);
								}
								posts.push({
									label : i,
									data : v
								});
							});
							D.Charts.status.show(posts);
						}
					},
					get : function(){
						D.ajax.get('?act=get_status_chars', function(json){
							D.Charts.status.set(json.data.datas);
						});
					},
					show : function(posts){
						var charts = $('#signed-sales-charts').css({'width':'100%' , 'height':'320px'});
						$.plot("#signed-sales-charts", posts, {
							hoverable: true,
							shadowSize: 0,
							series: {
								lines: { show: true },
								points: { show: true }
							},
							xaxis: {
								tickLength: 12,
								tickDecimals : 0
							},
							yaxis: {
								ticks: 7,
								tickDecimals : 0
							},
							grid: {
								backgroundColor: { colors: [ "#fff", "#fff" ] },
								borderWidth: 1,
								borderColor:'#555'
							}
						});
					}
				}
			}

			  function drawPieChart(placeholder, data, position) {
			 	  $.plot(placeholder, data, {
					series: {
						pie: {
							show: true,
							tilt:0.8,
							highlight: {
								opacity: 0.25
							},
							stroke: {
								color: '#fff',
								width: 2
							},
							startAngle: 2
						}
					},
					legend: {
						show: true,
						position: position || "ne", 
						labelBoxBorderColor: null,
						margin:[-30,0]
					}
					,
					grid: {
						hoverable: true,
						clickable: true
					}
				 })
			 }

			D.Main = {
				init : function(){
					D.Source.ldata();
				}
			}
			D.Source = {
				placeholder : null,
				init : function(){
					D.Source.placeholder = $('#piechart-placeholder').css({'width':'90%' , 'min-height':'150px'});
					$('.src-date').on('click', function(){
						var box = $(this);
						var day = box.attr('day');
						$('.dropdown-menu li').removeClass('active');
						box.parent().addClass('active');
						$('.src-box-icon').addClass('invisible');
						box.children('.src-box-icon').removeClass('invisible');
						$('.source-date').html(box.text());
						D.Source.ldata(day);
					});
				},
				ldata : function(orderby){
					$('.source-loading').removeClass('hide');
					D.ajax.get('?act=get_sources&orderby=' + orderby, function(json){
						$('.source-loading').addClass('hide');
						drawPieChart(D.Source.placeholder, json.data.datas);
						$('.source-day').html(json.data.date);
//						 D.Source.placeholder.data('chart', json.data);
//						 D.Source.data('draw', drawPieChart);
					});
				}
			}
			jQuery(function($) {
				$('.easy-pie-chart.percentage').each(function(){
					var $box = $(this).closest('.infobox');
					var barColor = $(this).data('color') || (!$box.hasClass('infobox-dark') ? $box.css('color') : 'rgba(255,255,255,0.95)');
					var trackColor = barColor == 'rgba(255,255,255,0.95)' ? 'rgba(255,255,255,0.25)' : '#E2E2E2';
					var size = parseInt($(this).data('size')) || 50;
					$(this).easyPieChart({
						barColor: barColor,
						trackColor: trackColor,
						scaleColor: false,
						lineCap: 'butt',
						lineWidth: parseInt(size/10),
						animate: /msie\s*(8|7|6)/.test(navigator.userAgent.toLowerCase()) ? false : 1000,
						size: size
					});
				})
			
				$('.sparkline').each(function(){
					var $box = $(this).closest('.infobox');
					var barColor = !$box.hasClass('infobox-dark') ? $box.css('color') : '#FFF';
					$(this).sparkline('html', {tagValuesAttribute:'data-values', type: 'bar', barColor: barColor , chartRangeMin:$(this).data('min') || 0} );
				});
			
			 /**
			 we saved the drawing function and the data to redraw with different position later when switching to RTL mode dynamically
			 so that's not needed actually.
			 */
			
			  var $tooltip = $("<div class='tooltip top in'><div class='tooltip-inner'></div></div>").hide().appendTo('body');
			  var previousPoint = null;

						D.Source.placeholder.on('plothover', function (event, pos, item) {
							if(item) {
								if (previousPoint != item.seriesIndex) {
									previousPoint = item.seriesIndex;
									var tip = item.series['label'] + " : " + parseFloat(item.series['percent']).toFixed(2)+'%';
									$tooltip.show().children(0).text(tip);
								}
								$tooltip.css({top:pos.pageY + 10, left:pos.pageX + 10});
							} else {
								$tooltip.hide();
								previousPoint = null;
							}
						});

				var d1 = d2 = d3 = [
					['201314', 0.5],
					['201315', 1.5],
					['201316', 3.5],
					['201317', 5.5],
				];
				var sales_charts = $('#sales-charts').css({'width':'100%' , 'height':'440px'});
				$.plot("#sales-charts", [
<!--{loop $customers_datas $k $v}-->
					{
						label : "${$natures[$k] ? $natures[$k] : '未知'}",
						data: [
<!--{loop $weeks $w $d}-->
							['${$w+1}', ${intval($customers_datas[$k][$w + 1])}],
<!--{/loop}-->
						]
					},
<!--{/loop}-->
				], {
					hoverable: true,
					shadowSize: 0,
					series: {
						lines: { show: true },
						points: { show: true }
					},
					xaxis: {
						tickLength: 7,
						tickDecimals : 0
					},
					yaxis: {
						ticks: 7,
						tickDecimals : 0
					},
					grid: {
						backgroundColor: { colors: [ "#fff", "#fff" ] },
						borderWidth: 1,
						borderColor:'#555'
					}
				});

				$('#recent-box [data-rel="tooltip"]').tooltip({placement: tooltip_placement});
				function tooltip_placement(context, source) {
					var $source = $(source);
					var $parent = $source.closest('.tab-content')
					var off1 = $parent.offset();
					var w1 = $parent.width();
			
					var off2 = $source.offset();
					var w2 = $source.width();
			
					if( parseInt(off2.left) < parseInt(off1.left) + parseInt(w1 / 2) ) return 'right';
					return 'left';
				}
			
			
				$('.dialogs,.comments').slimScroll({
					height: '300px'
			    });
				
				//Android's default browser somehow is confused when tapping on label which will lead to dragging the task
				//so disable dragging when clicking on label
				var agent = navigator.userAgent.toLowerCase();
				if("ontouchstart" in document && /applewebkit/.test(agent) && /android/.test(agent))
				  $('#tasks').on('touchstart', function(e){
					var li = $(e.target).closest('#tasks li');
					if(li.length == 0)return;
					var label = li.find('label.inline').get(0);
					if(label == e.target || $.contains(label, e.target)) e.stopImmediatePropagation() ;
				});
			
				$('#tasks').sortable({
					opacity:0.8,
					revert:true,
					forceHelperSize:true,
					placeholder: 'draggable-placeholder',
					forcePlaceholderSize:true,
					tolerance:'pointer',
					stop: function( event, ui ) {//just for Chrome!!!! so that dropdowns on items don't appear below other items after being moved
						$(ui.item).css('z-index', 'auto');
					}
					}
				);
				$('#tasks').disableSelection();
				$('#tasks input:checkbox').removeAttr('checked').on('click', function(){
					if(this.checked) $(this).closest('li').addClass('selected');
					else $(this).closest('li').removeClass('selected');
				});
			});
		</script>
</body>
</html>